package com.example.mydesignmodule.iterator;

import java.util.ArrayList;
import java.util.List;

/**
 * @author tgw
 * @date 2021/3/5
 * @describe
 */
class ArrayPeopleCompany<T> implements IteratorCompany<T> {
    private People[] peopleList;

    public ArrayPeopleCompany() {
        peopleList = new People[4];
        peopleList[0]=(new People(1, "数组tgw1"));
        peopleList[1]=(new People(2, "数组tgw2"));
        peopleList[2]=(new People(3, "数组tgw3"));
        peopleList[3]=(new People(4, "数组tgw4"));

    }


    @Override
    public Iterator itertor() {
        return new ArrayCreateIterator(peopleList);
    }
}
